package com.school.entity;
public abstract class Person {
    // protected修饰：子类可访问，包外非子类不可直接访问
    protected String id;
    protected String name;
    protected String gender;

    // 带参构造方法：初始化共性属性
    public Person(String id, String name, String gender) {
        this.id = id;
        this.name = name;
        this.gender = gender;
    }

    // 抽象方法：打印工作单（子类必须重写）
    public abstract void printWorksheet();

    public String getName() {
        return name;
    }

}
